<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${article.id}"  type="hidden">
						 <input id="Ttype" name="Ttype" th:value="${article.articleType}" type="hidden">
							<div class="form-group">	
								<label class="col-sm-2 control-label">标题：</label>
								<div class="col-sm-9">
									<input id="title" name="title" th:value="${article.title}" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">标签：</label>
								<div class="col-sm-4">
									<input id="tagIds" name="tagIds" th:value="${article.tagIds}" class="form-control" type="text">
								</div>
								<label class="col-sm-2 control-label">作者：</label>
								<div class="col-sm-3">
									<input id="writer" name="writer" th:value="${article.writer}" class="form-control" type="text">
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-2 control-label">所属菜单：</label>
								<div class="col-sm-4">
									<input id="menuId" name="menuId" th:value="${article.menuId}" class="form-control" type="text">
								</div>
								<label class="col-sm-2 control-label">文章类型：</label>
								<div class="col-sm-3">
									<select data-placeholder="--选择类别--" name="articleType" id="articleType"
											class="form-control chosen-select" tabindex="2" required>
										<option value="">--选择文章类型--</option>
											</select>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-2 control-label">资源：</label>
								<div class="col-sm-4">
									<input id="resourceId" name="resourceId" th:value="${article.resourceId}" class="form-control" type="text">
								</div>
								<label class="col-sm-2 control-label">是否隐藏：</label>
								<div class="col-sm-3">
									<div class="onoffswitch">
										<input id="hideFlag" name="hideFlag" type="checkbox"  checked="" value="1" th:checked=${article.hideFlag==1}
											   class="onoffswitch-checkbox" >
										<label class="onoffswitch-label" for="hideFlag" >
											<span class="onoffswitch-inner"></span>
											<span class="onoffswitch-switch"></span>
										</label>
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">资源数量：</label>
								<div class="col-sm-4">
									<input id="resourcrNum" name="resourcrNum" th:value="${article.resourcrNum}" class="form-control" type="text">
								</div>
								<label class="col-sm-2 control-label">剩余资源数量：</label>
								<div class="col-sm-3">
									<input id="excessResourcrNum" name="excessResourcrNum" th:value="${article.excessResourcrNum}" class="form-control" type="text">
								</div>
							</div>

						   <div class="form-group">
							   <label class="col-sm-2 control-label">是否下架：</label>
							   <div class="col-sm-9">
								   <div class="onoffswitch">
									   <input id="enableFlag" name="enableFlag" type="checkbox"  checked="" value="1"
											  th:checked=${article.enableFlag==1} class="onoffswitch-checkbox" >
									   <label class="onoffswitch-label" for="enableFlag">
										   <span class="onoffswitch-inner"></span>
										   <span class="onoffswitch-switch"></span>
									   </label>
								   </div>
							   </div>
							</div>

							<div class="form-group">
								<label class="col-sm-2 control-label">下架理由：</label>
								<div class="col-sm-9">
									<textarea id="disenableReason" name="disenableReason" th:text="${article.disenableReason}"  class="form-control" ></textarea>
								</div>
							</div>

							<div class="form-group">

								<input id="content" name="content" type="hidden"
									   th:value="${article.content}"> <label
									class="col-sm-2 control-label">文章内容：</label>
								<div class="col-sm-9">
									<div class="ibox-content no-padding">
										<div id="content_sn" class="summernote"></div>
									</div>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-8 col-sm-offset-5">
									<button type="submit" class="btn btn-primary">保存文章</button>
									<a class="btn btn-default waves-effect waves-light"
									   onclick="returnList()">返回列表</a>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script type="text/javascript" src="/js/appjs/dj/article/edit.js">
	</script>
</body>
</html>
